package com.atgm.mall.gmmailmember.feign;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailmember.feign.fallback.ClubFeignFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "gm-mall-club", fallback = ClubFeignFallbackService.class, qualifier = "clubFeignService")
public interface ClubFeignService {

    /**
     * 修改点赞数量
     * @param id
     * @param count
     * @return
     */
    @GetMapping("/gmmallclub/clubarticle/updateThumbsCount/{id}/{count}")
    R updateThumbsCount(@PathVariable("id") Long id, @PathVariable("count") Integer count);

    /**
     * 获取文章信息
     * @param id
     * @return
     */
    @GetMapping("/gmmallclub/clubarticle/info/{id}")
    R getArticleInfoById(@PathVariable("id") Long id);

    /**
     * 修改收藏数量
     * @param id
     * @param count
     * @return
     */
    @GetMapping("/gmmallclub/clubarticle/updateCollectCount/{id}/{count}")
    R updateCollectCount(@PathVariable("id") Long id, @PathVariable("count") Integer count);

    /**
     * 修改评论点赞数量
     * @param id
     * @param count
     * @return
     */
    @GetMapping("/gmmallclub/articlecomment/updateThumbsCount/{id}/{count}")
    R updateCommentThumbsCount(@PathVariable("id") Long id, @PathVariable("count") Integer count);

    /**
     * 修改回复的点赞数量信息
     * @param id
     * @param count
     * @return
     */
    @PutMapping("/gmmallclub/commentreply/updateThumbsCount/{id}/{count}")
    R updateReplyThumbsCount(@PathVariable("id") Long id, @PathVariable("count") Integer count);

    /**
     * 修改游戏评论的有用数量
     * @param id
     * @param count
     * @return
     */
    @GetMapping("/gmmallclub/gamecomment/updateThumbsCount/{id}/{count}")
    R updateGameUseFulCount(@PathVariable("id") Long id, @PathVariable("count") Integer count);
}
